import axios from 'axios'
var baseUrl="http://api.cat-shop.penkuoer.com"
export const GET=(url,params,header)=>{
    return axios({
        url:`${baseUrl}${url}`,
        params:params,
        headers:{
            authorization:"Bearer "+localStorage.token
        }
    }).then(res=>res)
}
export const POST = (url, params,header) => {
	return axios({
		url: `${baseUrl}${url}`,
		method: 'post',
		data: params,
		headers: {
			authorization: `Bearer `+localStorage.getItem('token')
		}
	}).then(res => {
		return res
	})
}

export const DELETE = (url, params) => {
	return axios({
		url: `${baseUrl}${url}`,
		method: 'delete',
		data: params,
		headers: {
			authorization: `Bearer `+localStorage.getItem('token')
		}
	}).then(res => {
		return res
	})
}
